{include file="Index/header" /}

<link href="__PUBLIC__/js/froala/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/js/froala/css/froala_editor.min.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/js/froala/js/froala.jquery.js"></script>
<script src="__PUBLIC__/js/froala/js/froala_editor.min.js"></script>
 
    <form action="{:url('Article/add')}" method="post" /> 
	    <input type="hidden" name="sbt" value="1">
	    <input type="hidden" name="aid" value="{$aid}">
    	<div class="formbody">
    		<div class="formtitle"><span>文章添加</span></div>
		    <ul class="forminfo">
		     	<li>
			    	<label>文章标题</label>
			    	<input name="title" type="text" class="dfinput" value="{$ArticleInfo.title}" size="80"/>
			    </li> 
		     	 <li>
			    	<label>文章logo</label>
			    	<div style="float:left;margin-bottom:10px;">
			    	  <input name="logo" id="img1" type="text" readonly class="dfinput" value="{$ArticleInfo.logo}" size="80"/>
			    	  
			    	 </div>
			    	<label class="config-upload">
								上传<input style="width:0px;" accept="image/*" name="img" id="uploadFile1" onchange="uploadImg(1);" type="file">
					</label>
					<div class="config-upload">
						<a href="javascript:void(0);" onclick="showPic(1);">预览</a>
					</div>
			    </li>
			    
			   
			    <li>
			    	<label>文章分类</label>
			    	<select name="category_id" class="form-select">
						{volist name="categoryArr" id="vo" key="k" } 
						<option {if $key==$ArticleInfo[category_id]} selected {/if} value="{$key}">{$vo}</option>
						{/volist}
					 
					</select>
			    </li> 
			   
			    <li>
		    	 	<label>作者</label>
			    	<input name="author" type="text"  class="dfinput" value="{$ArticleInfo.author}" /> 
			    </li>
			  
			  
			  	 
			     <li>
		    	 	<label>点击量</label>
			    	<input name="views" type="text" class="dfinput" value="{$ArticleInfo.views}" /> 
			    </li>
			    <li>
		    	 	<label>来源</label>
			    	<input name="source" type="text" class="dfinput" value="{$ArticleInfo.source}" size="80"/>
			    </li>
			    <li>
		    	 	<label>是否置顶</label>
			    	<label><input type="radio" name="is_top" {if $ArticleInfo['is_top']=="1"||!$ArticleInfo['is_top']} checked {/if} value="1"><font color="red" style="font-weight:bold;">是</font></label>
			    	<label><input type="radio" name="is_top" {if $ArticleInfo['is_top']=="2"} checked {/if} value="2"><font color="grey" style="font-weight:bold;">否</font></label>
			    </li>
			    <li>
		    	 	<label>是否显示</label>
			    	<label><input type="radio"   name="is_show" {if $ArticleInfo['is_show']=="1"||!$ArticleInfo['is_show']} checked{/if} value="1"><font color="grey" style="font-weight:bold;">显示</font></label>
			    	<label><input type="radio"   name="is_show" {if $ArticleInfo['is_show']=="2"} checked {/if}  value="2" ><font color="green" style="font-weight:bold;">隐藏</font></label>
			    </li>
			   
			    
			    
			    
			    <li>
			    	<label>文章内容</label>
			    	
				  	<div   class="admin-textarea">
				         <textarea id='edit' name="content">{$ArticleInfo.content}</textarea>
					 </div>
			    </li>
			    
			    
			     <li>
		    	 	<label>SEO关键字</label>
			    	<input name="keywords" type="text"  class="dfinput" value="{$ArticleInfo.keywords}" size="80" /> 
			    </li>
			    <li>
		    	 	<label>SEO描述</label>
			    	<input name="description" type="text"  class="dfinput" value="{$ArticleInfo.description}" size="80"/> 
			    </li>
			    
			    <li>
			    	<label>&nbsp;</label>
			   		 <input name="submit" type="submit" class="btn" value="确认保存"/>
			   	</li>
		    </ul>
    	</div>
	</form>
<script>

 

//多文本编辑器
$(function(){
    $('#edit').editable({inlineMode: false, alwaysBlank: true,width:'900px',height:'300px'});
});

//图片上传回调
function uploadCall(obj,path){
	 $("#img"+obj).val(path);
}
//预览
function showPic(obj){
	art.dialog.open($("#showPic").val()+'?pic='+$("#img"+obj).val(),{title:'图片预览'});
}

</script>

{include file="Index/footer" /}